package service.Impl;

import dao.Impl.PetDaoMySQLlmpl;
import dao.PetDao;
import entity.Pet;
import jakarta.annotation.Resource;
import service.PetService;
//@Resource(type=PetServiceImpl.class)
public class PetServicelmpl implements PetService {

    private PetDao petDao;
    public PetDao getPetDao() {
        return petDao;
    }
    public void setPetDao(PetDao petDao) {
        this.petDao = petDao;
    }

    /**
     * PetDao petDao = new PetDaoMySQLlmpl();
     * */

    @Override
    public boolean save(Pet pet) {
        return petDao.insert(pet) > 0;
    }
}
